<layout name='layout' />

<div class="admin-main">
	<blockquote class="layui-elem-quote">
		<a href="<{:U('Goods/index')}>" class="layui-btn layui-btn-small">
			<i class="layui-icon">&#xe603;</i> 返回列表
		</a>

		<button type="button" class="layui-btn layui-btn-small layui-btn-danger" onclick="goodsUploadImage()"><i class="fa fa-plus"></i> 添加图片</button>
	</blockquote>

	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		<legend>【<{$name}>】图片</legend>
	</fieldset>
	
	<div class="thumbnail">
	<volist name="list" id="vo">
		<li>
	    	<img src="<{$vo.picname}>" />
	        <p>
	        <a href="<{:U('Goods/delimg',array('id'=>$vo['id']))}>" class="layui-btn layui-btn-small" onclick="return confirm('删除后将不能恢复，确定要这么做吗？')"><i class="fa fa-trash"></i> 删除</a>
	        </p>
		</li>
	</volist>
	</div>
</div>
<script>
function goodsUploadImage () {
	layer.open({
		type: 2,
		title: '上传图片',
		shadeClose: true,
		shade: 0.8,
		area: ['600px', '300px'],
		content: "<{:U('Goods/addimg',array('goodsID'=>$goodsID))}>" //iframe的url
	}); 
}
</script>